package com.ywk.pattern._14_observer._14_8;

import com.ywk.pattern._14_observer._14_8.delegate.EventHandler;

public abstract class Subject {

    private EventHandler eventHandler=new EventHandler();

    public EventHandler getEventHandler() {
        return eventHandler;
    }

    public void setEventHandler(EventHandler eventHandler) {
        this.eventHandler = eventHandler;
    }

    //增加需要帮忙放哨的员工
    public abstract void addListener(Object object, String methodName, Object... args);

    //告诉所有需要帮忙放哨的员工
    public abstract void notifyX();

}

